package net.animats.music;

public class Chord extends NoteSet {

    public static void main(String args[]) {
        Chord chord;
        chord = new Chord(Note.getNote("A"), ChordType.getChordType("Major"));
        System.out.println(chord.getName() + " : " + chord);
        chord = new Chord(Note.getNote("A"), ChordType.getChordType("Minor"));
        System.out.println(chord.getName() + " : " + chord);
        chord = new Chord(Note.getNote("C"), ChordType.getChordType("Major7th"));
        System.out.println(chord.getName() + " : " + chord);
        chord = new Chord(Note.getNote("C"), ChordType.getChordType("7th"));
        System.out.println(chord.getName() + " : " + chord);
        chord = new Chord(Note.getNote("A"), Note.getNote("C"), Note.getNote("E"));
        System.out.println(chord.getName() + " : " + chord);
    }

    public Chord(String _rootNote, String _chordType) {
        super(Note.getNote(_rootNote), ChordType.getChordType(_chordType));
        //System.out.println("Trying to get " + _rootNote + " of type " + _chordType);
    }

    /* CREATE THE CHORD BY SPECIFYING THE ROOT NOTE AND INTERVAL SET */
    public Chord(Note _rootNote, IntervalSet _intervalSet) {
        super(_rootNote, _intervalSet);
    }

    public Chord(Note... _notes) {
        // CREATE A CHORD FROM A SET OF NOTES.
        // TRY EACH NOTE IN TURN AS THE ROOT NOT AND THEN CREATE AN INTERVAL SET
        // TEST THIS INTERVAL SET AGAINST THE KNOWN CHORD TYPES
        // CREATE A CHORD WITH THAT ChordType and ROOT Note
        super(_notes);
    }
}
